﻿using Fee.Orders.AuthProjectWorkflow;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace Fee.Mapping.Orders.AuthProjectOrders
{
    public class StationCostDetailMapping : IEntityTypeConfiguration<StationCostDetail>
    {
        public void Configure(EntityTypeBuilder<StationCostDetail> builder)
        {
            builder.HasKey(_ => _.Id);
            builder.Property(_ => _.Id).ValueGeneratedOnAdd();
            builder.HasOne(_ => _.ConstructionTask);
            //builder.HasOne(f => f.Station);
            builder.HasMany(f => f.CostDetails).WithOne();
            builder.ToTable("fee_stationCostDetail");
        }
    }
}